Throughout the late Middle Ages, Castilian towns underwent a process of rapid economic and political growth which the monarchy sought to control. Accordingly, the monarchy reoriented its policies towards the towns. It attempted to impose the figure of the ‘corregidor’, the representative and defender of royal interests; it intervened wherever possible in the appointment of local government offices; it played its part in urban conflicts, alternately supporting opposing factions in an effort to take advantage of the situation and secure its own interests; and finally, the state established regulations governing economic activity. The process of royal intervention culminated under the Catholic monarchs (1474–1504) with what can be considered as a royal triumph.